<template>
	<!-- 素养提升 -->
	<view class="list">
		<view v-for="(item,index) in list" :key="index" @click="C_listItem(item)">
			<view>{{item.name}}</view>
			<image :src="item.image" mode="widthFix"></image>
		</view>
	</view>
</template>
<script>
	export default{
		data(){
			return{
				list:[]
			}
		},
		 onShow() {
			this.def_list()
		},
		methods:{
			async def_list(){
				let indexelevate = await this.$u.api.indexelevate()
				this.list = indexelevate.data
			},
			C_listItem(item){
				uni.navigateTo({
					url:'./detail/detail?en_db='+encodeURIComponent(JSON.stringify(item))
				})
			}
		}
	}
</script>
<style lang="scss">
	page{
		background-color: #FFFFFF;
		.list{
			width: 90%;
			margin: auto;
			>view{
				line-height: 45rpx;
				margin: 30rpx 0;
				display: flex;
				>view{
					flex: 1;
					margin-right: 50rpx;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 3;
					overflow: hidden;
				}
				image{
					width: 170rpx;
					height: 170rpx;
				}
			}
		}
	}
</style>